<!--<?php
include_once PrintEot('header');
if(empty($action)){
print <<<EOT
-->
<form action="$admin_file" method="post" name="form">

    <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
            <td align="left" class="tittab">
                <strong>广告计划管理 &gt;&gt; 状态控制</strong>
            </td>
        </tr>
    </table>
    <table id="Table50" border="0" cellpadding="0" cellspacing="1" width="96%" align=center>
         <tr>
            <td colspan=2 height=30 class="zmenu"><b>数据分类：</b>
<!--
EOT;
 showPageLink("all", "1", "全部数据");
 showPageLink("status", "0", "暂停");
 showPageLink("status", "1", "运营中");  
print <<<EOT
-->
            </td></tr>    
            <td><b>快速查询：</b><select id="searchtype" name="searchtype">
								<option value="a.name" selected>计划名称</option>
								<option value="b.mer_name">客户简称</option>			
							</select>
							<input type="text" name="searchkey" value="$searchkey" class="text"/>
							<input type="button" name="btnQuery" value="查询" class="text"/>
						</td>
            <td align="right" valign="center">
                <table id="Table51" border="0" cellpadding="0" cellspacing="5" height="30">
                    <input name="allSelect" type="hidden" value="all" />
                    <tr>
                        <td align="middle" valign="center">
                            <a href="javascript:document.location.reload();">
                                <img align="absMiddle" border="0" height="15" src="$imgpath/admin/reserch.gif" style="text-decoration: underline" width="17" />
                                <span style="color: #547054"> 刷新</span></a>
<!--
EOT;
						if($canaudit==true){							
							showButton(4,'暂停','javascript:ConfirmDel("'.$admin_file.'&action=stop'.$transtr.'&curpage='.$curpage.'","确定暂停选中计划吗？暂停后此计划下的广告不显示！");');
							showButton(4,'运营','javascript:ConfirmDel("'.$admin_file.'&action=open'.$transtr.'&curpage='.$curpage.'","确定开放选中此计划吗？开放后此计划下的广告可显示！");');
						}
						if($candel==true){
							showButton(2,'删除','javascript:ConfirmDel("'.$admin_file.'&action=del'.$transtr.'&Page='.$curpage.'","此操作不可恢复,确认删除吗？");');
						}print <<<EOT
-->
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td height="2" colspan=2>
            </td>
        </tr>
    </table>
    <div class="tab">
        <table id="Table52" border="0" cellpadding="3" cellspacing="0" align=center>
            <tr>
                <td align="middle" class="title" height="20" valign="center">序号</td>
                <td align="middle" class="title" height="20" valign="center">
                    <input id="Checkbox1" name="as" onclick="allchecked()" type="checkbox" />全选
                </td>
                <td align="middle" class="title" height="20" valign="center">计划名称</td>
                <td align="middle" class="title" height="20" valign="center">支付标准</td>                
                <td align="middle" class="title" height="20" valign="center">每日限额</td>   
                <td align="middle" class="title" height="20" valign="center">创意数量</td>
                <td align="middle" class="title" height="20" valign="center">投放站长数</td>
                <td align="middle" class="title" height="20" valign="center">投放站点数</td> 
                <td align="middle" class="title" height="20" valign="center">日志表标志</td>
                <td align="middle" class="title" height="20" valign="center">显示日志</td>                
                <td align="middle" class="title" height="20" valign="center">点击日志</td>                  
                <td align="middle" class="title" height="20" valign="center">状态</td>    
            </tr>
<!--
EOT;
$curidx = ($curpage-1)*$perpage;
$curpageidx = 0;
$showcount = count($db_advlist); 
foreach($db_advlist as $adv ){
	$curidx = $curidx+1;
	$curpageidx = $curpageidx+1;
	$feetype = $cfg_advfeetype[$adv[fee_type]];	
	$cdate = date('Y/m/d H:i:s',$adv[create_time]);
	$advstatus = $cfg_advstatus[$adv[status]];	
	$log_v = $cfg_yesno[$adv[is_view]];
	$log_c = $cfg_yesno[$adv[is_click]];	
print <<<EOT
--> 
            <tr height="20"  onclick="SwitchTd(this,'click',$curpageidx);" onmouseout="SwitchTd(this,'out',$curpageidx);" onmouseover="SwitchTd(this,'over',$curpageidx);" style="cursor: hand">
                <td align="middle" valign="center" height="20">$curidx </td>
                <td align="middle" valign="center"><input id="ids" name="ids" type="checkbox" value="$adv[id]" />
                </td>
                <td align="middle" valign="center">&nbsp;<a href="$basename?job=detail&action=advertise&curid=$adv[id]" class=NoLine>$adv[name]</a></td>
                <td align="middle" valign="center">&nbsp;$feetype</td>
                <td align="middle" valign="center">&nbsp;$adv[day_maxmoney]</td>
             	<td align="middle" valign="center">&nbsp;$adv[creative_count]</td>                
                <td align="middle" valign="center">&nbsp;$adv[aff_count]</td>
                <td align="middle" valign="center">&nbsp;$adv[site_count]</td>                              
                <td align="middle" valign="center">$adv[log_flag]</td>
                <td align="middle" valign="center">
<!--
EOT;
	if($adv[is_view]==1 && $adv[log_v_created]==0) echo "<a href='$admin_file&action=createview&curid=$adv[id]' color='red' style='TEXT-DECORATION: underline'>无,需要生成</a>";
	if($adv[is_view]==1 && $adv[log_v_created]==1) echo "<font color='green'>有,无需生成</font>";
	if($adv[is_view]==0) echo "<font color='blue'>无需生成</font>";	
print <<<EOT
-->                
                </td> 
                <td align="middle" valign="center">
<!--
EOT;
	if($adv[is_click]==1 && $adv[log_c_created]==0) echo "<a href='$admin_file&action=createclick&curid=$adv[id]' color='red' style='TEXT-DECORATION: underline'>无,需要生成</a>";
	if($adv[is_click]==1 && $adv[log_c_created]==1) echo "<font color='green'>有,无需生成</font>";
	if($adv[is_click]==0) echo "<font color='blue'>无需生成</font>";	
print <<<EOT
-->                
                </td>                                 
                <td align="middle" valign="center">&nbsp;$advstatus</td> 
            </tr>
<!--
EOT;
}print <<<EOT
-->
        </table>
    </div>
    <table id="Table1" border="0" cellpadding="0" cellspacing="0" width="98%">
        <tr>
            <td>
                &nbsp;</td>
            <td align="right" height="35">
<!--
EOT;
	showPageBreakInfo($showcount);
print <<<EOT
-->
             &nbsp;</td>
        </tr>
    </table>
    <input type="hidden" id="count" name="count" value="$showcount" />

</form>

<!--
EOT;
}?>-->